package com.suray.wcs.service.enums;

public enum  NotificationTypeEnum {

    INFO((byte) 1, "通知信息"),
    WARN((byte) 2, "警告信息"),
    ERROR((byte) 3, "错误信息");
    private byte type;
    private String name;

    NotificationTypeEnum(byte type, String name) {
        this.type = type;
        this.name = name;
    }

    public byte getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static NotificationTypeEnum getByType(byte type) {
        for (NotificationTypeEnum item : NotificationTypeEnum.values()) {
            if(item.getType() == type) {
                return item;
            }
        }
        return null;
    }
}
